<template>
  <div>
    <el-skeleton animated v-if="props.loading">
    <template #template>
      <el-skeleton-item
        v-for="i in 8"
        :key="i"
        variant="p"
        style="height: 18px; margin: 5px"
      />
      <slot></slot>
    </template>
  </el-skeleton>
  <el-empty v-bind="$attrs" v-else />
  </div>
</template>
<script setup name="SkeletonAnEmpty">
import { defineProps } from 'vue';

const props = defineProps({
  loading: {
    type: Boolean,
    default: false,
  },  
});
</script>
